package com.cch.cooperation.api.zone.dto;

import com.cch.cooperation.dao.file.dto.FileDTO;
import com.cch.cooperation.dao.zone.dto.ZoneUserDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@ApiModel("空间动态")
@Data
public class ZonePostDTO {

    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("空间id")
    private String zoneId;

    @ApiModelProperty("发布用户id")
    private String userId;

    @ApiModelProperty("发布用户")
    private ZoneUserDTO user;

    @ApiModelProperty("点赞信息")
    private List<ZonePostLikeDTO> likes;

    @ApiModelProperty("内容")
    private String content;

    @ApiModelProperty("图片")
    private List<FileDTO> pics;

    @ApiModelProperty("来源类型（1.用户发帖 2.事项生成）")
    private Integer sourceType;

    @ApiModelProperty("来源id")
    private String sourceId;

    @ApiModelProperty("评论列表")
    private List<ZonePostCommentDTO> comments;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
